package edu.sctu.zcy.month201505.day20150517;

import java.util.List;

/**
 * Created by user24 on 2015/5/17.
 */
public class MainStudent {

    public static void main(String[] args) {

        TextOne textOne = new TextOne();

        textOne.getTercherInfo();

//        System.out.println(textOne.sortStudent().size());

//        System.out.println( TextOne.students2.size());

        List<Student> students = textOne.getStudent(60, textOne.sortStudent());
        System.out.println("学生排序后成绩大于code有：");
        for (Student stu : students){
            System.out.println("学号："+stu.getStudentID()+"  "+"姓名："+stu.getName()+"  "+"成绩："+stu.getScore()
                    +"  "+"年龄："+stu.getAge()+"  "+"性别："+stu.getSex()+"  "+"住址："+stu.getAddress());

        }

        textOne.getCode(new InterFaceStudent() {
            @Override
            public void getInfo(List<Student> student) {

                TextOne textOne = new TextOne();

                List<Student> students;

                students = textOne.getStudent(60,student);
//                学号，姓名，成绩，年龄，性别，住址
//                System.out.println(textOne.students2.size());
                System.out.println("是教授的学生并且成绩大于code有：");
                for (Student stu : students){
                    System.out.println("学号："+stu.getStudentID()+"  "+"姓名："+stu.getName()+"  "+"成绩："+stu.getScore()
                    +"  "+"年龄："+stu.getAge()+"  "+"性别："+stu.getSex()+"  "+"住址："+stu.getAddress());

                }


            }
        });

//        TextCourse textCourse = new TextCourse();


//        textOne.getCourse(textCourse.getSelect());


        List<Student> students1 = textOne.getStudentScoreInfo(90);
//        System.out.println(students1.size());
        for (int i = 0; i < students1.size(); i++) {
            System.out.println("成绩大于等于90的学生有："+students1.get(i).getName());
        }

        textOne.getCity("资阳市");
        textOne.getDistrict("青羊区");
        textOne.getAddress("成都市青羊区");
        textOne.getAddress("北京市青羊区1");


        textOne.getAddress("1");

    }



}
